package com.ruoyi.binance.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.binance.mapper.Binance15macdMapper;
import com.ruoyi.binance.domain.Binance15macd;
import com.ruoyi.binance.service.IBinance15macdService;

/**
 * 15分钟实时MACD数据Service业务层处理
 * 
 * @author zq
 * @date 2025-10-17
 */
@Service
public class Binance15macdServiceImpl implements IBinance15macdService 
{
    @Autowired
    private Binance15macdMapper binance15macdMapper;

    /**
     * 查询15分钟实时MACD数据
     * 
     * @param code 15分钟实时MACD数据主键
     * @return 15分钟实时MACD数据
     */
    @Override
    public Binance15macd selectBinance15macdByCode(String code)
    {
        return binance15macdMapper.selectBinance15macdByCode(code);
    }

    /**
     * 查询15分钟实时MACD数据列表
     * 
     * @param binance15macd 15分钟实时MACD数据
     * @return 15分钟实时MACD数据
     */
    @Override
    public List<Binance15macd> selectBinance15macdList(Binance15macd binance15macd)
    {
        return binance15macdMapper.selectBinance15macdList(binance15macd);
    }

    /**
     * 新增15分钟实时MACD数据
     * 
     * @param binance15macd 15分钟实时MACD数据
     * @return 结果
     */
    @Override
    public int insertBinance15macd(Binance15macd binance15macd)
    {
        binance15macd.setCreateTime(DateUtils.getNowDate());
        return binance15macdMapper.insertBinance15macd(binance15macd);
    }

    /**
     * 修改15分钟实时MACD数据
     * 
     * @param binance15macd 15分钟实时MACD数据
     * @return 结果
     */
    @Override
    public int updateBinance15macd(Binance15macd binance15macd)
    {
        binance15macd.setUpdateTime(DateUtils.getNowDate());
        return binance15macdMapper.updateBinance15macd(binance15macd);
    }

    /**
     * 批量删除15分钟实时MACD数据
     * 
     * @param codes 需要删除的15分钟实时MACD数据主键
     * @return 结果
     */
    @Override
    public int deleteBinance15macdByCodes(String[] codes)
    {
        return binance15macdMapper.deleteBinance15macdByCodes(codes);
    }

    /**
     * 删除15分钟实时MACD数据信息
     * 
     * @param code 15分钟实时MACD数据主键
     * @return 结果
     */
    @Override
    public int deleteBinance15macdByCode(String code)
    {
        return binance15macdMapper.deleteBinance15macdByCode(code);
    }
}
